/**
 * Searcher class to search songs to the player library
 *
 * @copyright  hoatle (hoatle.net)
 * @author     hoatle
 * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
 * @version    1.0-alpha
 * @link       http://hoatle.net/Project-Music-Engine
 * @since      Class available since Release 1.0-alpha
 * $Id: Searcher.js 4 2009-01-16 12:03:30Z hoatlevan $
 */

/**
  * class Searcher
  * Searcher Constructor
  *
  * @params opt_params MAP
  * @return Searcher
  */

Searcher = function(opt_params) {
    this._init ();
    return this;
}

/*
 * Searcher Settings
 */
Searcher.prototype.settings = {
    "SEARCH_URL" : "http://",
    "PREVIEW_HOOK": 5,
    // Set the preview hook time in seconds
    "ITEMS_PER_PAGE": 10
};

/**
 * _init sets all Searcher attributes to their default value. Make sure to call
 * this method within your class constructor
 */
Searcher.prototype._init = function(opt_params) {
    /**
     * The keyword to search
     */
    this.queryString = "";
    /**
     * Paging parameter
     */
    this.startPage = 1;
    /**
     * an object of search Result
     */
    this.searchResult = null;
    /**
     * Hold all the search result from a user's session
     * (Can hold quite large amount of data, considering remove??)
     */
    this.sessionSearchResult = null;

    /**Aggregations: */

    /**Compositions: */

}

/**
 * songIndex from Searcsher.searchResult.songs[songIndex]
 * @param songIndex
 * @return boolean      
 */
Searcher.prototype.previewSong = function(songIndex) {
    
}



